import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

export const useMapStore = defineStore('map', () => {
	const markerItem = ref({})
	const markerVisible = ref<boolean>(false)
	// 设置当前marker 数据
	const setMarkerItem = (item) => {
		markerItem.value = item
	}
	const setMarkerVisible = (visible: boolean) => {
		markerVisible.value = visible || true
	}
	return { markerVisible, markerItem, setMarkerItem, setMarkerVisible }
})
